<script setup lang="ts">
const tags=useTagsStore();
const route=useRoute();
const navigate=(path:string,item:any)=>{
  navigateTo({path,...item});
}
</script>

<template>
  <div class="my-1 overflow-y-auto">
    <el-tag
        v-for="(item,path) in tags.tags"
        :key="path"
        class="mx-0.5"
        size="default"
        :type="route.path==path?'danger':'success'"
        @close="tags.removeTag(path)"
        @click="navigate(path,item)"
        :closable="route.path!=path"
    >
      <span class="p2">{{ item.title }}</span>
    </el-tag>
  </div>

</template>

<style scoped lang="scss">

</style>